package 访问者设计模式;

public class Patients extends Vistitor {
    @Override
    public void visit(Amoxicillin amoxicillin) {
        System.out.println("病人:" + name + "正在取" + amoxicillin.getName() + "的药");
    }

    @Override
    public void visit(Painkiller painkiller) {
        System.out.println("病人:" + name + "正在取" + painkiller.getName() + "的药");
    }
}
